

/****** Object:  View [dbo].[Report_UserInMonths_View]    Script Date: 11/26/2012 01:03:25 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO
  
ALTER VIEW [dbo].[Report_UserInMonths_View]  
AS  
SELECT  ISNULL(MONTH(TimeCreated),0) Months  
  ,Count(Username) TotalUser  
  ,DATENAME(month,TimeCreated) MonthNames  
  ,CONVERT(varchar(4), TimeCreated, 111) Years
FROM dbo.Users  
Group by MONTH(TimeCreated)  
  ,DATENAME(month,TimeCreated)
  ,TimeCreated
  
  
  

GO


